package cairngorm.business
{
	import cairngorm.model.UserLocator;
	import cairngorm.vo.UserVo;
	
	import mx.rpc.AbstractOperation;
	import mx.rpc.IResponder;
	import mx.rpc.remoting.RemoteObject;

	public class UserDelegate{
		private var model:UserLocator = UserLocator.getInstance();
		private var responder:IResponder;
		public function UserDelegate(responder:IResponder){
			trace('step4: delegate get responder');
			this.responder = responder;
		}
		public function login(userVo:UserVo):void{
			var categoryremote:RemoteObject = new RemoteObject;
			categoryremote.destination = "userAction";
			var o:AbstractOperation = categoryremote.getOperation("sayHello");
			o.send();
			trace('step5: responder handler and return result to userLoginCommand');
			responder.result(userVo);
		}
	}
}